<?php

namespace app\common\model;

use think\Model;
use think\Db;

class MessageConsult extends Model
{
    protected $table = 'message_consult';

    public function GetMessageUnread()
    {
        return Db('message_consult')->where('to_id', session('merchant.merchant_id'))->where('type', 1)->where('is_read',0)->find();
    }
}